<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <body>

        <ui:composition template="./Test.xhtml">



            <ui:define name="content">


                <fieldset style="height: 800px">
                    <legend><b>Update Customer </b></legend>

                    <center>
                        <table width="800" height="600" border="0">
                            <tr>

                                <td><b>Email *</b></td>
                                <td><p:inputText value="#{customerBean.cu.email}" disabled="true"/></td>

                            </tr>
                            <tr>

                                <td><b>Password * </b></td>
                                <td><p:password  minLength="6" feedback="" value="#{customerBean.cu.password}" id="txtPassword" required="true" requiredMessage="Password is not null"/></td>
                                <td><p:message for="txtPassword"/></td>
                            </tr>
                            <tr>
                                <td><b>Full Name * </b></td>
                                <td><p:inputText value="#{customerBean.cu.fullName}" id="txtfullName" required="true" requiredMessage="Full Name is not null">
                                        <f:validator validatorId="Validator.StringValidator"/></p:inputText>
                                </td>
                                <td><p:message for="txtfullName"/></td>
                            </tr>

                            <tr>
                                <td><b>Address * </b></td>
                                <td><p:editor value="#{customerBean.cu.address}" id="txtaddress" required="true" requiredMessage="Address is not null"/></td>
                                <td><p:message for="txtaddress"/></td>
                            </tr>

                            <tr>
                                <td><b>Phone * </b></td>
                                <td><p:inputText value="#{customerBean.cu.phone}" id="txtphone" required="true" requiredMessage="Phone is not null">
                                        <f:validator validatorId="Validator.PhoneValidator"/></p:inputText>
                                </td>
                                <td><p:message for="txtphone"/></td>
                            </tr>

                            <tr>
                                <td><b>Age * </b></td>
                                <td><p:inputText value="#{customerBean.cu.age}" id="txtage" required="true" requiredMessage="Age is not null">
                                        <f:validator validatorId="Validator.AgeValidator"/></p:inputText>
                                </td>
                                <td><p:message for="txtage"/></td>
                            </tr>

                            <tr>
                                <td></td>
                                <td>
                                    <h:commandButton value="Update" action="Customer" actionListener="#{customerBean.updateCustomer}" type="image" image="../resources/images/forms/form_submit.gif"/>

                                    <h:commandButton value="Cancel" action="Customer" type="image" image="../resources/images/forms/form_reset.gif"/>
                                </td>
                                <td></td>
                            </tr>
                        </table></center>

                </fieldset>




            </ui:define>



        </ui:composition>

    </body>
</html>
